package de.preamp.clients.java.playlist;

import java.util.Collection;

import javax.swing.ListModel;
import javax.swing.event.ListSelectionListener;

/**
 * @author André Stannek
 * @version 2010-01-23
 */
public interface PlaylistManager extends Iterable<Playlist>,
	ListSelectionListener, ListModel
{
    /**
     * Returns all playlists currently available.
     * 
     * @return all playlists currently available
     */
    Collection<Playlist> getPlaylists();

    /**
     * Returns the playlist that is currently selected and should be shown by
     * preamp.
     * 
     * @return the currently selected Playlist
     */
    Playlist getSelectedPlaylist();

    /**
     * creates a new playlist with a specified name.
     * 
     * @param name
     *            the name of the playlist to create
     */
    void newPlaylist(String name);

    /**
     * Removes a playlist.
     * 
     * @param list
     *            the Playlist to remove
     */
    void removePlaylist(Playlist list);

}
